package com.huazhi.wzsnw.model;

import org.apache.xmlbeans.impl.xb.xsdschema.impl.SchemaDocumentImpl;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ServiceRecord {
    private String tid;

    private Date servicedate;

    private String naturalname;

    private String devicenum;

    private String serviceproject;

    private String serviceway;

    private String servicestate;

    private String servicedatestring;

    private String serviceuser;

    private String cunname;

    private String state;

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid == null ? null : tid.trim();
    }

    public Date getServicedate() {
        return servicedate;
    }

    public void setServicedate(Date servicedate) {
        this.servicedate = servicedate;
    }

    public String getNaturalname() {
        return naturalname;
    }

    public void setNaturalname(String naturalname) {
        this.naturalname = naturalname == null ? null : naturalname.trim();
    }

    public String getDevicenum() {
        return devicenum;
    }

    public void setDevicenum(String devicenum) {
        this.devicenum = devicenum;
    }

    public String getServiceproject() {
        return serviceproject;
    }

    public void setServiceproject(String serviceproject) {
        this.serviceproject = serviceproject == null ? null : serviceproject.trim();
    }

    public String getServiceway() {
        return serviceway;
    }

    public void setServiceway(String serviceway) {
        this.serviceway = serviceway == null ? null : serviceway.trim();
    }

    public String getServicestate() {
        return servicestate;
    }

    public void setServicestate(String servicestate) {
        this.servicestate = servicestate == null ? null : servicestate.trim();
    }

    public String getServicedatestring() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        if(servicedate != null && servicedatestring == null){
            return dateFormat.format(servicedate);
        }
        return servicedatestring;
    }

    public void setServicedatestring(String servicedatestring) {
        this.servicedatestring = servicedatestring;
    }

    public String getServiceuser() {
        return serviceuser;
    }

    public void setServiceuser(String serviceuser) {
        this.serviceuser = serviceuser;
    }

    public String getCunname() {
        return cunname;
    }

    public void setCunname(String cunname) {
        this.cunname = cunname;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
}